package com.gooagoo.supercrm.ui.activity.home;

import android.text.TextUtils;
import android.util.TypedValue;
import android.view.View;
import android.widget.EditText;

import com.gooagoo.supercrm.R;
import com.gooagoo.supercrm.base.BaseActivity;
import com.gooagoo.supercrm.ui.activity.coupons.CouponsActivity;
import com.gooagoo.supercrm.ui.activity.manage.ManageActivity;

import org.apache.log4j.Logger;

import butterknife.BindView;
import butterknife.OnClick;
import butterknife.OnTextChanged;

public class HomeActivity extends BaseActivity {
    private static Logger logger = Logger.getLogger(HomeActivity.class);
    @BindView(R.id.et_money)
    EditText et_money;

    @OnClick(R.id.rl_yhqhx)
    void checkYhq(){
        startActivity(CouponsActivity.class,null);
    }

    @OnClick(R.id.rl_myManage)
    void myManage(){
        startActivity(ManageActivity.class,null);
    }

    @OnTextChanged(R.id.et_money)
    void  onTextChange(){
        logger.info("onTextChange");
        if (TextUtils.isEmpty(et_money.getText().toString())){
            et_money.setTextSize(TypedValue.COMPLEX_UNIT_SP,24);
            et_money.setTextColor(getResources().getColor(R.color.et_money));
        }else {
            et_money.setTextSize(TypedValue.COMPLEX_UNIT_SP,12);
            et_money.setTextColor(getResources().getColor(R.color.et_no_money));
        }

    }

    @Override
    protected int setContentView() {
        return R.layout.activity_home;
    }

    @Override
    protected void init() {

    }
}
